export function isExternal (path) {
    return /^(https?:|mailto:|tel:)/.test(path)
}

/**
 * @param {string} str
 * @returns {Boolean}
 */
export function validUsername (str) {
    const validmap = ['admin', 'editor'];
    return validmap.indexOf(str.trim()) >= 0
}
